﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace House_Control
{
    //This class will handle everything dealing with dishwashers in the house.
    class Dishwasher : Appliance
    {
        //This string holds the type of cycle currently set.
        string cycleType;

        //These boolean variables represent different options for this dishwasher.
        bool turboZone;
        bool highTemp;
        bool saniRinse;
        bool heatedDry;

        //We need this variable for when we call the constructor of the base class.
        static int applianceType = Appliance.DISHWASHER;

        //In C#, you use : base() to call the constructor of the base class and in this case the constructor takes applianceType as an argument.
        public Dishwasher() : base(applianceType)
        {
            cycleType = "";
            turboZone = false;
            highTemp = false;
            saniRinse = false;
            heatedDry = false;
        }

        public String getCycleType()
        {
            return cycleType;
        }

        public void setCycleType(string ct)
        {
            cycleType = ct;
        }

        //These methods internally handle turnning on/off options for this dishwasher.
        public void setTurboZone()
        {
            if (turboZone) turboZone = false;
            else turboZone = true;
        }

        public void setHighTemp()
        {
            if (highTemp) highTemp = false;
            else highTemp = true;
        }

        public void setSaniRinse()
        {
            if (saniRinse) saniRinse = false;
            else saniRinse = true;
        }

        public void setHeatedDry()
        {
            if (heatedDry) heatedDry = false;
            else heatedDry = true;
        }
    }
}
